<template>
  <div class="news">
    <div class="news_box">
      <div class="news_title">{{this.newsData.title}}</div>
      <img :src="this.newsData.pic" width="100%">
      <div class="news_content" v-html="this.newsData.content"></div>
    </div>
  </div>
</template>

<script>
export default {
    data() {
        return {
            newsData: {}
        }
    },
    mounted() {
        let id = this.$route.query.id
        this.$API.getNewsData({params: {id: id}}).then(res=> {
            this.newsData = res.data.data;
            // console.log(this.newsData)
        })
    }
}
</script>

<style scoped>
.news {
    margin-top: 1.1rem;
}
.news_box {
    background-color: #fff;
}
.news_title {
    font-size: 0.45rem;
    text-align: center;
    margin: 0.3rem 0;
}
</style>